<?php
$this->pageTitle = Yii::app()->name . ' - ' . UserModule::t("Login");
$this->breadcrumbs = array(
    UserModule::t("Login"),
);
?>
<?php if (Yii::app()->user->hasFlash('loginMessage')): ?>

    <div class="success">
    <?php echo Yii::app()->user->getFlash('loginMessage'); ?>
</div>

<?php endif; ?>

    <div class="form">
    <?php echo CHtml::beginForm(); ?>

    <div class="message info"><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></div>

    <p>
        <?php echo CHtml::activeLabelEx($model, 'username'); ?>
        <br/>
        <?php echo CHtml::activeTextField($model, 'username', array('class' => 'text')) ?>
        <?php echo NHtml::error($model, 'username', array('class' => 'note error')) ?>
    </p>

    <p>
        <?php echo CHtml::activeLabelEx($model, 'password'); ?>
        <br/>
        <?php echo CHtml::activePasswordField($model, 'password', array('class' => 'text')) ?>
        <?php echo NHtml::error($model, 'password', array('class' => 'note error')) ?>
    </p>

    <p>
        <!--
        <p class="hint">
            <?php echo CHtml::link(UserModule::t("Register"), Yii::app()->getModule('user')->registrationUrl); ?> | <?php echo CHtml::link(UserModule::t("Lost Password?"), Yii::app()->getModule('user')->recoveryUrl); ?>
        </p>
        -->
    </p>

    <p>
        

        <?php echo CHtml::submitButton(UserModule::t("Login"),array('class' => 'submit long')); ?>
        <?php echo CHtml::activeCheckBox($model, 'rememberMe'); ?>
        <?php echo CHtml::activeLabelEx($model, 'rememberMe'); ?>
        </p>

    <?php echo CHtml::endForm(); ?>
        </div><!-- form -->


<?php
            $form = new CForm(array(
                        'elements' => array(
                            'username' => array(
                                'type' => 'text',
                                'maxlength' => 32,
                            ),
                            'password' => array(
                                'type' => 'password',
                                'maxlength' => 32,
                            ),
                            'rememberMe' => array(
                                'type' => 'checkbox',
                            )
                        ),
                        'buttons' => array(
                            'login' => array(
                                'type' => 'submit',
                                'label' => 'Login',
                            ),
                        ),
                            ), $model);
?>